<template>
  <div class="book-warp">
    <!-- 头部 -->
    <el-form :inline="true" :model="search" class="demo-form-inline">
      <el-form-item label="书籍名称">
        <el-input v-model="search.name" placeholder="书籍名称"></el-input>
      </el-form-item>
      <el-form-item label="作者">
        <el-input v-model="search.name" placeholder="作者"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">查询</el-button>
      </el-form-item>
    </el-form>
    <!-- 表单 -->
    <el-table :data="tableData" border style="width: 100%" height="80vh">
      <el-table-column prop="name" label="书名"></el-table-column>
      <el-table-column prop="author" label="作者"></el-table-column>
      <el-table-column prop="pic" label="图片"></el-table-column>
      <el-table-column prop="introduction" label="简介"></el-table-column>
      <el-table-column prop="count" label="字数"></el-table-column>
      <el-table-column prop="status" label="状态"></el-table-column>
      <el-table-column label="操作" width="100">
        <template slot-scope="scope">
          <el-button @click="edit(scope.row)" type="text" size="small">编辑</el-button>
          <el-button @click="del(scope.row)" type="text" size="small">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination :query="page" @paginationChange="paginationChange" />
  </div>
</template>
<style scope lang="scss">
@import "./index.scss";
</style>
<script type="text/babel">
import vm from "./vm";
export default vm;
</script>
